﻿<%@ Page Title="" Theme="WebMaster" Language="C#" MasterPageFile="~/WebMaster/MasterPage/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="WebMaster_Administrator_Users_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<%@ Register src="../../../ControlUser/uscTitleForm.ascx" tagname="uscTitleForm" tagprefix="uc1" %>

<%@ Register src="../../../ControlUser/uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc2" %>


<asp:Content ID="Content1" ContentPlaceHolderID="PageContentPlaceHolder" Runat="Server">
<script type="text/javascript">
     function pageLoad() {
      $("#<%= btnNew.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
        $("#<%= btnSave.ClientID %>").click(function() { 
         if ($("#<%= txtUserName.ClientID %>").val().length>0 && $("#<%= txtMatKhau.ClientID %>").val().length>0 && $("#<%= txtXacNhanMK.ClientID %>").val()==$("#<%= txtMatKhau.ClientID %>").val())
         {
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }
        }); 
        
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        }  
   
</script>  
    
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    
    <table style="width: 100%;">
        <tr>
            <td align="center">                
                <uc1:uscTitleForm ID="uscTitleForm1" runat="server" 
                    Messeage="Quản Lý Người Dùng" />
            </td>
        </tr>
       <tr>
            <td valign="top" style="background-color:#EBEBEB; font-weight: bold; font-family: verdana, Arial, Helvetica;font-size: 11px; color: #4C7A9E;text-transform:capitalize; height: 24px;" valign="middle">            
                <asp:Panel ID="Panel1" runat="server" BackColor="#EBEBEB" Width="100%">
                    <asp:ImageButton ID="btnNew" runat="server"  CausesValidation="false"
                        ImageUrl="~/WebMaster/Images/Document.png" onclick="btnNew_Click" 
                        Height="25px" Width="25px" />
                    &nbsp;<asp:ImageButton ID="btnSave" runat="server" 
                        ImageUrl="~/WebMaster/Images/Save.png" onclick="btnSave_Click" 
                        Height="25px" Width="25px" />
                        &nbsp;<asp:ImageButton ID="btnFind" runat="server"  CausesValidation="false"
                        ImageUrl="~/WebMaster/Images/Find.png"  
                         Height="25px" Width="25px" onclick="btnFind_Click" />
                    </asp:Panel>         
            </td>
        </tr>        
    </table>
     <cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" 
            BackColor="#CCFFFF" Font-Names="Arial" ForeColor="#3366FF" Height="344px" 
            Width="1004px">
            <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="Nhập thông tin" TabIndex="0">
               <ContentTemplate>
     <table style="width:100%;">
                <tr>
                    <td colspan="2" style="font-weight: bold">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td>
                        Trung tâm phân phối </td>
                    <td>
                        
                        <asp:DropDownList ID="cbbTTPP" runat="server" Width="242px">
                        </asp:DropDownList>
                       
                    </td>
                </tr>
                <tr>
                    <td>
                        Tên đăng nhập </td>
                    <td>
                        <asp:TextBox ID="txtUserName" ReadOnly="true" BackColor="Yellow" runat="server" Width="242px"></asp:TextBox>
                         <asp:RequiredFieldValidator ControlToValidate="txtUserName" Display="None" ID="R1" runat="server" ErrorMessage="Phải nhập Username"></asp:RequiredFieldValidator>
                         <cc1:ValidatorCalloutExtender TargetControlID="R1" ID="ValidatorCalloutExtender1" runat="server" Enabled="True">
                        </cc1:ValidatorCalloutExtender>
                       
                        
                    </td>
                </tr>
                <tr>
                    <td>
                        Mật khẩu </td>
                    <td>
                        <asp:TextBox ID="txtMatKhau" runat="server" Width="242px" TextMode="Password"></asp:TextBox>
                        <asp:RequiredFieldValidator ControlToValidate="txtMatKhau" Display="None" ID="R2" runat="server" ErrorMessage="Phải nhập mật khẩu"></asp:RequiredFieldValidator>
                         <cc1:ValidatorCalloutExtender TargetControlID="R2" ID="ValidatorCalloutExtender2" runat="server" Enabled="True">
                        </cc1:ValidatorCalloutExtender>
                    </td>
                </tr>                
                <tr>
                    <td>
                        Xác nhận mật khẩu </td>
                    <td>
                        <asp:TextBox ID="txtXacNhanMK" runat="server" Width="242px" TextMode="Password"></asp:TextBox>
                        <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txtXacNhanMK" ControlToCompare="txtMatKhau" Display="None"  ErrorMessage="Mật khẩu không khớp" />
                        <cc1:ValidatorCalloutExtender TargetControlID="CompareValidator1" ID="ValidatorCalloutExtender3" runat="server" Enabled="True">
                        </cc1:ValidatorCalloutExtender>
                    </td>
                </tr>
                <tr>
                    <td>
                        Quyền hạn </td>
                    <td>
                        <asp:DropDownList ID="DropDownListQuyenHan" runat="server" Width="242px">
                            <asp:ListItem Selected="True">Vui lòng chọn quyền</asp:ListItem>
                            <asp:ListItem Value="sa">SA Trung tâm phân phối</asp:ListItem>
                            <asp:ListItem Value="ad">Quản trị hệ thống</asp:ListItem>
                            <asp:ListItem Enabled="False" Value="us">BUM*</asp:ListItem>
                        </asp:DropDownList>
                      
                    </td>
                </tr>
                <tr>
                    <td align="justify" rowspan="1">
                        Mô tả </td>
                    <td>
                        <asp:TextBox ID="txtMieuTa" runat="server" Width="451px" Height="62px" TextMode="MultiLine"></asp:TextBox>
                        
                        </td>
                </tr>
                <tr>
                    <td>
                        </td>
                    <td>
                        <asp:CheckBox ID="CheckBoxOneConnect" runat="server" Text="Kết nối một" Visible="False" />&nbsp;
                        <asp:CheckBox ID="CheckBoxConnected" runat="server" Text="Đang hoạt động" />
                        
                        
                        
                    </td>
                </tr>
                
            </table>    
          </ContentTemplate>
            </cc1:TabPanel>
            <cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="Tìm kiếm" TabIndex="1">
               <ContentTemplate>
                <br />
                    <table align="center" style="width:37%;">
                    <tr>
                    <td align="center">
                        Nhập thông tin cần tìm&nbsp;
                    </td>
                    </tr>
                        <tr>
                            <td align="center">
                                &nbsp;<asp:TextBox ID="txtSearch" runat="server"
                                    Width="168px" AutoPostBack="True" ontextchanged="txtSearch_TextChanged"></asp:TextBox>
                                &nbsp;&nbsp;<asp:ImageButton ID="btnSearch" runat="server" CausesValidation="False" 
                                    ImageUrl="~/image/Search.png"
                                    style="width: 16px; height: 16px;" onclick="btnSearch_Click" />
                                &nbsp;&nbsp;&nbsp;&nbsp;</td>
                        </tr>
                        <tr>
                            <td>
                                <asp:GridView ID="GridView2" runat="server" AllowPaging="True" 
                                    AutoGenerateColumns="False" BackColor="#DEBA84" BorderColor="#DEBA84" 
                                    BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2" 
                                    DataKeyNames="UserName" 
                                     PageSize="5" Width="306px" 
                                    onpageindexchanging="GridView2_PageIndexChanging" 
                                    onrowcommand="GridView2_RowCommand">
                                    <Columns>
                                        <asp:BoundField DataField="UserName" HeaderText="Tên đăng nhập" />
                                        <asp:BoundField DataField="UserDescription" HeaderText="Mô tả" />
                                        <asp:TemplateField>
                                            <ItemTemplate>
                                                <asp:Button ID="Button2" runat="server" CausesValidation="false" 
                                                    CommandName="chon" Text="Chọn" />
                                            </ItemTemplate>
                                            <FooterStyle BackColor="White" BorderColor="White" />
                                            <HeaderStyle BackColor="White" BorderColor="White" />
                                            <ItemStyle BackColor="White" BorderColor="White" />
                                        </asp:TemplateField>
                                    </Columns>
                                    <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
                                    <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
                                    <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
                                    <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
                                </asp:GridView>
                                <br />
                                <br />
                            </td>
                        </tr>
                    </table>
               </ContentTemplate>
               </cc1:TabPanel>
             </cc1:TabContainer>
            <uc2:uscMsgBox ID="uscMsgBox1" runat="server" />
            
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>

